import ajax from '@/utils/request'
import { concatUrl } from '@/utils'
import './types'

// 获取分类
export function getCategory(data?: GetCategory, fields: string | object = { fields: 'id,categoryName,childCategories' }) {
    return ajax({
        url: concatUrl('/v1/category/index', fields),
        data
    })
}

// 根据城市获取分类列表
export function getCategoryByCity(data?: GetCategory, fields: string | object = { fields: 'id,categoryName,childCategories' }) {
	return ajax({
			url: concatUrl('/v1/category/platform-index', fields),
			data
	})
}
